package various;


import lejos.nxt.LCD;
import lejos.nxt.SensorPort;
import lejos.nxt.UltrasonicSensor;

public class ProvaUltrasuoni {
	public static void main(String[] args) throws Exception {
		UltrasonicSensor us = new UltrasonicSensor(SensorPort.S1);
		for (int i = 0; i < 30; i++) {
			LCD.clear();
			LCD.drawInt(us.getDistance(), 0, 2);
			Thread.sleep(1000);

		}
	}

}
